<UserControl x:Class="Outcoder.Calcium.Modules.WebBrowser.WebBrowserToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WebBrowser="clr-namespace:Outcoder.Calcium.Modules.WebBrowser"
    Height="300" Width="300">
   <UserControl.Resources>
		<ResourceDictionary>
			<SolidColorBrush x:Key="ToolBarButtonHoverBorder" Color="#3399FF"/>
			<SolidColorBrush x:Key="ToolBarButtonHover" Color="#C2E0FF"/>
			<SolidColorBrush x:Key="ToolBarButtonPressedBorder" Color="#3399FF"/>
			<SolidColorBrush x:Key="ToolBarButtonPressed" Color="#99CCFF"/>
			<Style TargetType="{x:Type Button}">
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
				<Setter Property="Padding" Value="2"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="Background" Value="Transparent"/>
				<Setter Property="BorderBrush" Value="Transparent"/>
				<Setter Property="HorizontalAlignment" Value="Center"/>
				<Setter Property="VerticalAlignment" Value="Center"/>
				<Setter Property="HorizontalContentAlignment" Value="Center"/>
				<Setter Property="VerticalContentAlignment" Value="Center"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3,3,3,3" Padding="{TemplateBinding Padding}">
								<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ToolBarButtonHoverBorder}"/>
									<Setter Property="Background" TargetName="Bd" Value="{x:Null}"/>
								</Trigger>
								<Trigger Property="IsKeyboardFocused" Value="true">
									<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ToolBarButtonHoverBorder}"/>
									<Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonHover}"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="true">
									<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource ToolBarButtonPressedBorder}"/>
									<Setter Property="Background" TargetName="Bd" Value="{StaticResource ToolBarButtonPressed}"/>
								</Trigger>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</ResourceDictionary>
	</UserControl.Resources>
	<Grid x:Name="grid_Main">
		<ToolBar Height="26" Name="toolBar_Main">
			<ToolBar.Background>
				<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
					<GradientStop Color="#FFFFFFFF" Offset="0"/>
					<GradientStop Color="#FFFFFBFF" Offset="0.5"/>
					<GradientStop Color="#FFBECEE0" Offset="1"/>
				</LinearGradientBrush>
			</ToolBar.Background>
			<TextBox x:Name="TextBox_Url" Width="400" KeyUp="TextBox_Url_KeyUp" VerticalAlignment="Center" 
					 ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
			<Button x:Name="Button_Navigate"
					Command="{x:Static WebBrowser:WebBrowserViewModel.NavigateCommand}" 
					CommandParameter="{Binding ElementName=TextBox_Url, Path=Text}"	
				Width="18" Height="18">
				<Canvas Width="15" Height="15" HorizontalAlignment="Center" VerticalAlignment="Center">
					<Path Fill="#FFDE6B25" Stretch="Fill" Stroke="{x:Null}" Width="8.069" Height="8.069" RenderTransformOrigin="0.5,0.5" Data="M1.0746887E-05,1.501 C1.0746887E-05,0.67202059 0.67202059,0 1.501,0 L8.62,0 C9.4489794,0 10.121,0.67202059 10.121,1.501 L10.121,8.62 C10.121,9.4489794 9.4489794,10.121 8.62,10.121 8.62,10.121 1.0746887E-05,1.501 1.0746887E-05,1.501 z" Canvas.Top="4.267" Canvas.Left="1.904">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="1" ScaleY="1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="45"/>
								<TranslateTransform X="-8.8817841970012523E-16" Y="8.8817841970012523E-16"/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
				</Canvas>
			</Button>
						
		</ToolBar>
	</Grid>
</UserControl>
